how to perform mahamatical operation in java with Math class